/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ConsultarEquipoDeFantasia.java
 *
 * Created on 09/10/2009, 10:22:50
 */

package diseño09;

import diseño09.controles.GestorDeEquipoDeFantasia;
import diseño09.controles.GestorDePartidosFechasYClubes;
import diseño09.controles.GestorDePeriodosDeVeda;
import diseño09.controles.GestorDeUsuarios;
import diseño09.entidades.EquipoFantasia;
import diseño09.entidades.Fecha;
import diseño09.entidades.Jugador;
import diseño09.entidades.Participante;

/**
 *
 * @author emanuel
 */
public class ConsultarEquipoDeFantasia extends javax.swing.JFrame {

    /** Creates new form ConsultarEquipoDeFantasia */
    public ConsultarEquipoDeFantasia() {
        initComponents();
        this.setLocationRelativeTo(null);
    }

    public ConsultarEquipoDeFantasia(IngresoUsuario pantallaAnterior, Participante participanteActual) {
        initComponents();
        this.setLocationRelativeTo(null);

        this.pantallaAnterior=pantallaAnterior;
        this.participanteActual=participanteActual;

        jLabel5.setText(participanteActual.getNombre()+" "+participanteActual.getApellido());

        GestorDePartidosFechasYClubes gestor=new GestorDePartidosFechasYClubes();
        fechaActual=gestor.obtenerFechaActual();

        String nombreEquipo=participanteActual.getNombreEquipo();
        
        GestorDeEquipoDeFantasia gestor2=new GestorDeEquipoDeFantasia();
        EquipoFantasia equipo=gestor2.obtenerEquipoEnFecha(nombreEquipo, fechaActual);

        equipoActual=equipo;

        java.awt.Button[] botones={button38,button48,button46,button47,button45,
                            button43,button44,button42,button41,button40,
                            button39,button49,button51,button52,button50};
        botonesCancha=botones;

        javax.swing.JLabel[] etiquetas={jLabel40,jLabel41,jLabel42,jLabel43,jLabel45,
                            jLabel44,jLabel47,jLabel46,jLabel50,jLabel48,
                            jLabel49,jLabel51,jLabel52,jLabel53,jLabel54};
        etiquetasCancha=etiquetas;

        actualizarEquipoEnPantalla(equipoActual);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jTextField7 = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jPanel5 = new javax.swing.JPanel();
        jSeparator13 = new javax.swing.JSeparator();
        jSeparator14 = new javax.swing.JSeparator();
        jSeparator15 = new javax.swing.JSeparator();
        jSeparator16 = new javax.swing.JSeparator();
        jLabel40 = new javax.swing.JLabel();
        jLabel41 = new javax.swing.JLabel();
        jLabel42 = new javax.swing.JLabel();
        jLabel43 = new javax.swing.JLabel();
        jLabel44 = new javax.swing.JLabel();
        jLabel45 = new javax.swing.JLabel();
        jLabel46 = new javax.swing.JLabel();
        jLabel47 = new javax.swing.JLabel();
        jLabel48 = new javax.swing.JLabel();
        jLabel49 = new javax.swing.JLabel();
        jLabel50 = new javax.swing.JLabel();
        button38 = new java.awt.Button();
        button39 = new java.awt.Button();
        button40 = new java.awt.Button();
        button41 = new java.awt.Button();
        button42 = new java.awt.Button();
        button43 = new java.awt.Button();
        button44 = new java.awt.Button();
        button45 = new java.awt.Button();
        button46 = new java.awt.Button();
        button47 = new java.awt.Button();
        button48 = new java.awt.Button();
        jPanel6 = new javax.swing.JPanel();
        jLabel51 = new javax.swing.JLabel();
        jLabel52 = new javax.swing.JLabel();
        jLabel53 = new javax.swing.JLabel();
        jLabel54 = new javax.swing.JLabel();
        button49 = new java.awt.Button();
        button50 = new java.awt.Button();
        button51 = new java.awt.Button();
        button52 = new java.awt.Button();
        jLabel17 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Consultá tu Equipo");

        jLabel5.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel5.setText("NombreUsuario");
        jLabel5.setFocusable(false);

        jLabel6.setFont(new java.awt.Font("DejaVu Sans", 0, 14));
        jLabel6.setText("Puntaje:");

        jTextField7.setEditable(false);
        jTextField7.setFocusable(false);

        jButton1.setText("Modificar");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButton2.setText("Consultar Puntaje Por Fecha");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jButton3.setText("Cancelar");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        jButton4.setFont(new java.awt.Font("Tahoma", 0, 12));
        jButton4.setText("Cerrar Sesión");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        jPanel5.setBackground(new java.awt.Color(0, 153, 0));
        jPanel5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        jSeparator14.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                jSeparator14FocusLost(evt);
            }
        });

        jSeparator15.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jSeparator16.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jLabel40.setText("ARQ T");

        jLabel41.setText("DEF T");

        jLabel42.setText("DEF T");

        jLabel43.setText("DEF T");

        jLabel44.setText("VOL T");

        jLabel45.setText("DEF T");

        jLabel46.setText("VOL T");

        jLabel47.setText("VOL T");

        jLabel48.setText("DEL T");

        jLabel49.setText("DEL T");

        jLabel50.setText("DEL T");

        button38.setBackground(new java.awt.Color(255, 255, 0));
        button38.setEnabled(false);
        button38.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button38ActionPerformed(evt);
            }
        });

        button39.setBackground(new java.awt.Color(255, 0, 0));
        button39.setEnabled(false);
        button39.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button39ActionPerformed(evt);
            }
        });

        button40.setBackground(new java.awt.Color(255, 0, 0));
        button40.setEnabled(false);
        button40.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button40ActionPerformed(evt);
            }
        });

        button41.setBackground(new java.awt.Color(255, 0, 0));
        button41.setEnabled(false);
        button41.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button41ActionPerformed(evt);
            }
        });

        button42.setBackground(new java.awt.Color(0, 0, 255));
        button42.setEnabled(false);
        button42.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button42ActionPerformed(evt);
            }
        });

        button43.setBackground(new java.awt.Color(0, 0, 255));
        button43.setEnabled(false);
        button43.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button43ActionPerformed(evt);
            }
        });

        button44.setBackground(new java.awt.Color(0, 0, 255));
        button44.setEnabled(false);
        button44.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button44ActionPerformed(evt);
            }
        });

        button45.setBackground(new java.awt.Color(153, 0, 153));
        button45.setEnabled(false);
        button45.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button45ActionPerformed(evt);
            }
        });

        button46.setBackground(new java.awt.Color(153, 0, 153));
        button46.setEnabled(false);
        button46.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button46ActionPerformed(evt);
            }
        });

        button47.setBackground(new java.awt.Color(153, 0, 153));
        button47.setEnabled(false);
        button47.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button47ActionPerformed(evt);
            }
        });

        button48.setBackground(new java.awt.Color(153, 0, 153));
        button48.setEnabled(false);
        button48.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button48ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(103, 103, 103)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jSeparator15, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel40)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(button38, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(34, 34, 34)
                        .addComponent(jSeparator16, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel5Layout.createSequentialGroup()
                                .addComponent(jLabel42)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(button46, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel43)
                                .addGap(8, 8, 8))
                            .addComponent(jSeparator14, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(2, 2, 2)
                        .addComponent(button47, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(51, 51, 51))
            .addComponent(jSeparator13, javax.swing.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(137, 137, 137)
                .addComponent(jLabel47)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(button44, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(185, Short.MAX_VALUE))
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(142, 142, 142)
                .addComponent(jLabel48)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(button40, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(181, Short.MAX_VALUE))
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(30, 30, 30)
                .addComponent(jLabel50)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(button41, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 194, Short.MAX_VALUE)
                .addComponent(jLabel49)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(button39, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(46, 46, 46))
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(28, 28, 28)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel44)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(button43, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel41)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(button48, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 197, Short.MAX_VALUE)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel45)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(button45, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel46)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(button42, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(43, 43, 43))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSeparator15, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jSeparator16, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(button38, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel40))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator14, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel42)
                    .addComponent(button47, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(button46, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel43))
                .addGap(32, 32, 32)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel41)
                        .addGap(52, 52, 52)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(button44, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel47)))
                    .addComponent(button45, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel45)
                    .addComponent(button48, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(41, 41, 41)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jLabel44, javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(button43, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel46)
                    .addComponent(button42, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator13, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(41, 41, 41)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel48)
                    .addComponent(button40, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(32, 32, 32)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(button39, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel49)
                    .addComponent(button41, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel50))
                .addGap(64, 64, 64))
        );

        jPanel6.setBackground(new java.awt.Color(0, 153, 0));
        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Suplentes"));

        jLabel51.setText("ARQ S");

        jLabel52.setText("DEF S");

        jLabel53.setText("VOL S");

        jLabel54.setText("DEL S");

        button49.setBackground(new java.awt.Color(255, 255, 0));
        button49.setEnabled(false);
        button49.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button49ActionPerformed(evt);
            }
        });

        button50.setBackground(new java.awt.Color(255, 0, 0));
        button50.setEnabled(false);
        button50.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button50ActionPerformed(evt);
            }
        });

        button51.setBackground(new java.awt.Color(153, 0, 153));
        button51.setEnabled(false);
        button51.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button51ActionPerformed(evt);
            }
        });

        button52.setBackground(new java.awt.Color(0, 0, 255));
        button52.setEnabled(false);
        button52.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button52ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                        .addComponent(jLabel51)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)
                        .addComponent(button49, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                        .addComponent(jLabel52)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
                        .addComponent(button51, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jLabel54)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)
                        .addComponent(button50, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                        .addComponent(jLabel53)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
                        .addComponent(button52, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(button49, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel51))
                .addGap(30, 30, 30)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(button51, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel52))
                .addGap(30, 30, 30)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(button52, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel53, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addGap(32, 32, 32)
                        .addComponent(jLabel54))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                        .addGap(33, 33, 33)
                        .addComponent(button50, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(35, Short.MAX_VALUE))
        );

        jLabel17.setIcon(new javax.swing.ImageIcon("C:\\Documents and Settings\\PC\\Mis documentos\\NetBeansProjects\\trunk\\diseño09\\src\\diseño09\\logo pelota SOLO.PNG")); // NOI18N

        jLabel10.setIcon(new javax.swing.ImageIcon("C:\\Documents and Settings\\PC\\Mis documentos\\NetBeansProjects\\trunk\\diseño09\\src\\diseño09\\logo VE chico.png")); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(22, 22, 22)
                        .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGap(34, 34, 34)
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel17)))
                .addGap(11, 11, 11)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(63, 63, 63)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jButton3)
                            .addComponent(jButton2)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                    .addComponent(jLabel6)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jTextField7))
                                .addComponent(jButton1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(246, 246, 246))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 175, Short.MAX_VALUE)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jButton4)
                            .addComponent(jLabel5))
                        .addGap(137, 137, 137)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(40, 40, 40)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton4))
                    .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10))
                .addGap(76, 76, 76)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6)
                            .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(37, 37, 37)
                        .addComponent(jButton1)
                        .addGap(34, 34, 34)
                        .addComponent(jButton2)
                        .addGap(38, 38, 38)
                        .addComponent(jButton3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, 496, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * Botón de 'Modificar'
     * @param evt
     */
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:

        GestorDePeriodosDeVeda gestor= new GestorDePeriodosDeVeda();
        if(!gestor.fechaEnVeda(fechaActual)){
            ModificarEquipoFantasia ven=new ModificarEquipoFantasia(this,participanteActual,equipoActual);
            ven.setDefaultCloseOperation(2);
            ven.setVisible(true);
            this.setVisible(false);
        }
        else{
            FechaEnVeda veda=new FechaEnVeda(this);
            veda.setVisible(true);
        }
        
    }//GEN-LAST:event_jButton1ActionPerformed
/**
 * Botón de 'Consultar Puntaje por fecha'
 * @param evt
 */
    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        GestorDePartidosFechasYClubes gestor=new GestorDePartidosFechasYClubes();
        Fecha[] listaFechas=gestor.obtenerFechasCerradas();

        if(listaFechas!=null){
            ConsultarPuntajesFecha ven=new ConsultarPuntajesFecha(this,listaFechas,participanteActual,equipoActual);
            ven.setDefaultCloseOperation(2);
            ven.setVisible(true);

            this.setVisible(false);
        }
        else{
            NohayFechasCerradas ven= new NohayFechasCerradas();
            ven.setVisible(true);

        }

    }//GEN-LAST:event_jButton2ActionPerformed
    
    /**
     * Botón de 'Cerrar Sesión'
     * @param evt
     */
    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        // TODO add your handling code here:
        PantallaInicio inicio=new PantallaInicio();
        inicio.setVisible(true);
        GestorDeUsuarios gestor=new GestorDeUsuarios();
        gestor.desloguear(participanteActual);
        this.dispose();
    }//GEN-LAST:event_jButton4ActionPerformed

    private void jSeparator14FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jSeparator14FocusLost
        // TODO add your handling code here:
}//GEN-LAST:event_jSeparator14FocusLost

    private void button38ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button38ActionPerformed
        // TODO add your handling code here:
        Jugador jugador=new Jugador();
        GestorDeEquipoDeFantasia gestor=new GestorDeEquipoDeFantasia();

        jugador=gestor.obtenerJugador(equipoActual,0);

        InfoConsulta info=new InfoConsulta(this,jugador,equipoActual);
        info.setDefaultCloseOperation(2);
        info.setVisible(true);
}//GEN-LAST:event_button38ActionPerformed

    private void button39ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button39ActionPerformed
        // TODO add your handling code here:
        Jugador jugador=new Jugador();
        GestorDeEquipoDeFantasia gestor=new GestorDeEquipoDeFantasia();

        jugador=gestor.obtenerJugador(equipoActual,10);

        InfoConsulta info=new InfoConsulta(this,jugador,equipoActual);
        info.setDefaultCloseOperation(2);
        info.setVisible(true);
}//GEN-LAST:event_button39ActionPerformed

    private void button40ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button40ActionPerformed
        // TODO add your handling code here:
        Jugador jugador=new Jugador();
        GestorDeEquipoDeFantasia gestor=new GestorDeEquipoDeFantasia();

        jugador=gestor.obtenerJugador(equipoActual,9);

        InfoConsulta info=new InfoConsulta(this,jugador,equipoActual);
        info.setDefaultCloseOperation(2);
        info.setVisible(true);
}//GEN-LAST:event_button40ActionPerformed

    private void button41ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button41ActionPerformed
        // TODO add your handling code here:
        Jugador jugador=new Jugador();
        GestorDeEquipoDeFantasia gestor=new GestorDeEquipoDeFantasia();

        jugador=gestor.obtenerJugador(equipoActual,8);

        InfoConsulta info=new InfoConsulta(this,jugador,equipoActual);
        info.setDefaultCloseOperation(2);
        info.setVisible(true);
}//GEN-LAST:event_button41ActionPerformed

    private void button42ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button42ActionPerformed
        // TODO add your handling code here:
        Jugador jugador=new Jugador();
        GestorDeEquipoDeFantasia gestor=new GestorDeEquipoDeFantasia();

        jugador=gestor.obtenerJugador(equipoActual,7);

        InfoConsulta info=new InfoConsulta(this,jugador,equipoActual);
        info.setDefaultCloseOperation(2);
        info.setVisible(true);
}//GEN-LAST:event_button42ActionPerformed

    private void button43ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button43ActionPerformed
        // TODO add your handling code here:
        Jugador jugador=new Jugador();
        GestorDeEquipoDeFantasia gestor=new GestorDeEquipoDeFantasia();

        jugador=gestor.obtenerJugador(equipoActual,5);

        InfoConsulta info=new InfoConsulta(this,jugador,equipoActual);
        info.setDefaultCloseOperation(2);
        info.setVisible(true);
}//GEN-LAST:event_button43ActionPerformed

    private void button44ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button44ActionPerformed
        // TODO add your handling code here:
        Jugador jugador=new Jugador();
        GestorDeEquipoDeFantasia gestor=new GestorDeEquipoDeFantasia();

        jugador=gestor.obtenerJugador(equipoActual,6);

        InfoConsulta info=new InfoConsulta(this,jugador,equipoActual);
        info.setDefaultCloseOperation(2);
        info.setVisible(true);
}//GEN-LAST:event_button44ActionPerformed

    private void button45ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button45ActionPerformed
        // TODO add your handling code here:
        Jugador jugador=new Jugador();
        GestorDeEquipoDeFantasia gestor=new GestorDeEquipoDeFantasia();

        jugador=gestor.obtenerJugador(equipoActual,4);

        InfoConsulta info=new InfoConsulta(this,jugador,equipoActual);
        info.setDefaultCloseOperation(2);
        info.setVisible(true);
}//GEN-LAST:event_button45ActionPerformed

    private void button46ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button46ActionPerformed
        // TODO add your handling code here:
        Jugador jugador=new Jugador();
        GestorDeEquipoDeFantasia gestor=new GestorDeEquipoDeFantasia();

        jugador=gestor.obtenerJugador(equipoActual,2);

        InfoConsulta info=new InfoConsulta(this,jugador,equipoActual);
        info.setDefaultCloseOperation(2);
        info.setVisible(true);
}//GEN-LAST:event_button46ActionPerformed

    private void button47ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button47ActionPerformed
        // TODO add your handling code here:
        Jugador jugador=new Jugador();
        GestorDeEquipoDeFantasia gestor=new GestorDeEquipoDeFantasia();

        jugador=gestor.obtenerJugador(equipoActual,3);

        InfoConsulta info=new InfoConsulta(this,jugador,equipoActual);
        info.setDefaultCloseOperation(2);
        info.setVisible(true);
}//GEN-LAST:event_button47ActionPerformed

    private void button48ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button48ActionPerformed
        // TODO add your handling code here:
        Jugador jugador=new Jugador();
        GestorDeEquipoDeFantasia gestor=new GestorDeEquipoDeFantasia();

        jugador=gestor.obtenerJugador(equipoActual,1);

        InfoConsulta info=new InfoConsulta(this,jugador,equipoActual);
        info.setDefaultCloseOperation(2);
        info.setVisible(true);
}//GEN-LAST:event_button48ActionPerformed

    private void button49ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button49ActionPerformed
        // TODO add your handling code here:
        Jugador jugador=new Jugador();
        GestorDeEquipoDeFantasia gestor=new GestorDeEquipoDeFantasia();

        jugador=gestor.obtenerJugador(equipoActual,11);

        InfoConsulta info=new InfoConsulta(this,jugador,equipoActual);
        info.setDefaultCloseOperation(2);
        info.setVisible(true);
}//GEN-LAST:event_button49ActionPerformed

    private void button50ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button50ActionPerformed
        // TODO add your handling code here:
        Jugador jugador=new Jugador();
        GestorDeEquipoDeFantasia gestor=new GestorDeEquipoDeFantasia();

        jugador=gestor.obtenerJugador(equipoActual,14);

        InfoConsulta info=new InfoConsulta(this,jugador,equipoActual);
        info.setDefaultCloseOperation(2);
        info.setVisible(true);
}//GEN-LAST:event_button50ActionPerformed

    private void button51ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button51ActionPerformed
        // TODO add your handling code here:
        Jugador jugador=new Jugador();
        GestorDeEquipoDeFantasia gestor=new GestorDeEquipoDeFantasia();

        jugador=gestor.obtenerJugador(equipoActual,12);

        InfoConsulta info=new InfoConsulta(this,jugador,equipoActual);
        info.setDefaultCloseOperation(2);
        info.setVisible(true);
}//GEN-LAST:event_button51ActionPerformed

    private void button52ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button52ActionPerformed
        // TODO add your handling code here:
        Jugador jugador=new Jugador();
        GestorDeEquipoDeFantasia gestor=new GestorDeEquipoDeFantasia();

        jugador=gestor.obtenerJugador(equipoActual,13);

        InfoConsulta info=new InfoConsulta(this,jugador,equipoActual);
        info.setDefaultCloseOperation(2);
        info.setVisible(true);
}//GEN-LAST:event_button52ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
        pantallaAnterior.setVisible(true);
        this.dispose();
    }//GEN-LAST:event_jButton3ActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ConsultarEquipoDeFantasia().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private java.awt.Button button38;
    private java.awt.Button button39;
    private java.awt.Button button40;
    private java.awt.Button button41;
    private java.awt.Button button42;
    private java.awt.Button button43;
    private java.awt.Button button44;
    private java.awt.Button button45;
    private java.awt.Button button46;
    private java.awt.Button button47;
    private java.awt.Button button48;
    private java.awt.Button button49;
    private java.awt.Button button50;
    private java.awt.Button button51;
    private java.awt.Button button52;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel47;
    private javax.swing.JLabel jLabel48;
    private javax.swing.JLabel jLabel49;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JLabel jLabel51;
    private javax.swing.JLabel jLabel52;
    private javax.swing.JLabel jLabel53;
    private javax.swing.JLabel jLabel54;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JSeparator jSeparator13;
    private javax.swing.JSeparator jSeparator14;
    private javax.swing.JSeparator jSeparator15;
    private javax.swing.JSeparator jSeparator16;
    private javax.swing.JTextField jTextField7;
    // End of variables declaration//GEN-END:variables

    private IngresoUsuario pantallaAnterior;

    private Participante participanteActual;

    private EquipoFantasia equipoActual;

    private Fecha fechaActual;

    private java.awt.Button[] botonesCancha;

    private javax.swing.JLabel[] etiquetasCancha;

    public void actualizarEquipoEnPantalla(EquipoFantasia equipoActualizado){
        equipoActual=equipoActualizado;

        jTextField7.setText(String.valueOf(equipoActual.getPuntajeTotal()));

        GestorDeEquipoDeFantasia gestor=new GestorDeEquipoDeFantasia();
        Jugador[] jugadores=gestor.obtenerJugadores(equipoActual);

        for(int i=0;i<15;i++){
            if(jugadores[i]!=null){
                etiquetasCancha[i].setText(jugadores[i].getApellido());
                botonesCancha[i].setEnabled(true);
            }
            else{
                switch(i){
                    case 0: etiquetasCancha[i].setText("ARQ T");
                            botonesCancha[i].setEnabled(false);
                            break;
                    case 1:
                    case 2:
                    case 3:
                    case 4: etiquetasCancha[i].setText("DEF T");
                            botonesCancha[i].setEnabled(false);
                            break;
                    case 5:
                    case 6:
                    case 7: etiquetasCancha[i].setText("VOL T");
                            botonesCancha[i].setEnabled(false);
                            break;
                    case 8:
                    case 9:
                    case 10: etiquetasCancha[i].setText("DEL T");
                             botonesCancha[i].setEnabled(false);
                             break;
                    case 11: etiquetasCancha[i].setText("ARQ S");
                             botonesCancha[i].setEnabled(false);
                             break;
                    case 12: etiquetasCancha[i].setText("DEF S");
                             botonesCancha[i].setEnabled(false);
                             break;
                    case 13: etiquetasCancha[i].setText("VOL S");
                             botonesCancha[i].setEnabled(false);
                             break;
                    case 14: etiquetasCancha[i].setText("DEL S");
                             botonesCancha[i].setEnabled(false);
                             break;
                }
            }
        }

    }

}
